import Cookie from 'js-cookie'

// days 有效期以天为单位
// export const setCookie: (key: string, value: string, days: number) => void
//   = (key: string, value: string, days: number): void => {
//   Cookie.set(key, value, { expires: days })
// }
export function setCookie (key: string, value: string, days: number): void {
  Cookie.set(key, value, { expires: days })
}

// export const getCookie: (key: string) => undefined | string
//   = (key: string): undefined | string => {
//   return Cookie.get(key)
// }
export function getCookie (key: string): undefined | string {
  return Cookie.get(key)
}

// export const removeCookie: (key: string) => void
//   = (key: string): void => {
//   Cookie.remove(key)
// }

export function removeCookie (key: string): void {
  Cookie.remove(key)
}
